using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class alert_target_joinMap : EntityTypeConfiguration<alert_target_join>
    {
        public alert_target_joinMap()
        {
            // Primary Key
            this.HasKey(t => new { t.rule_line_id, t.alert_taget_id });

            // Properties
            this.Property(t => t.rule_line_id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.alert_taget_id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("alert_target_join");
            this.Property(t => t.rule_line_id).HasColumnName("rule_line_id");
            this.Property(t => t.alert_taget_id).HasColumnName("alert_taget_id");
            this.Property(t => t.service_seq).HasColumnName("service_seq");
        }
    }
}
